
#ifndef QRENDERSETTING_H
#define QRENDERSETTING_H

#include <limits>
#include <vector>

#include "glew.h"
#include "QRenderStructure.h"

#define SCREEN_WIDTH    1280
#define SCREEN_HEIGHT   800

#define WINDOW_WIDTH    700
#define WINDOW_HEIGHT   500

//#define NUMBER_TF_ENTRIES  1024
//#define NUMBER_INT_ENTRIES  256
#define NUMBER_TF_ENTRIES 256
#define NUMBER_INT_ENTRIES  256
#define NUMBER_HIS_ENTRIES 256

#define SIZE_SOBEL_OPERATOR 81

#define STEPSIZE_DELTA  1.0 / 1024
#define STEPSIZE_MIN    1.0 / 1024
#define STEPSIZE_MAX    1.0 / 32

class QRenderSetting
{
public:
    QRenderSetting();
    ~QRenderSetting();
    
    float stepSize;
    unsigned int stepBias, stepScale;
    int normalizeData;
    int drawWireframe, drawLight, printFPS;
    
    QRenderVector4 cameraRotation;
    QRenderVector3 cameraPosition;
    QRenderVector3 modelTranslation;
    unsigned int size[2];
    float transferFunction[NUMBER_TF_ENTRIES * 4];

    //added by wujian 2012-06-12
    int tfNumber;
    float transferFunctions[2][NUMBER_TF_ENTRIES * 4];

    QRenderVector3 lightPosition;
    QRenderVector3 lightColor;
	QRenderVector3 diffuseColor;

    float diffuseCoeff;
    float specularCoeff;
    float ambientCoeff;
    
    int sobelCoeff[SIZE_SOBEL_OPERATOR];
    
    void initTransferFunction();

    void setTfNumber(int number);
private:
    
};

#endif  // QRENDERSETTING